/**
 * 编辑-项目记录表js
 */

var vm = new Vue({
	el:'#dpLTE',
	data: {
		projectRecord: {
			id: 0,
            hospitalId: '0',
            resolvingStatusId: '0',
		},
        optionsHospital: [],
        optionsResolvingStatus: [],
	},
	methods : {
		setForm: function() {
			$.SetForm({
				url: '../../project/record/info?_' + $.now(),
		    	param: vm.projectRecord.id,
		    	success: function(data) {
		    		vm.projectRecord = data;
		    	}
			});
		},
		acceptClick: function() {
			if (!$('#form').Validform()) {
		        return false;
		    }
		    $.ConfirmForm({
		    	url: '../../project/record/update?_' + $.now(),
		    	param: vm.projectRecord,
		    	success: function(data) {
		    		$.currentIframe().vm.load();
		    	}
		    });
		},
        getHospitals: function () {
            $.getJSON("/sys/macro/value?_" + $.now() + "&value=客户", function (r) {
                vm.optionsHospital = r;
            });
        },
        getResolvingStatus: function () {
            $.getJSON("/sys/macro/value?_" + $.now() + "&value=解决状态", function (r) {
                vm.optionsResolvingStatus = r;
            });
        },
	}
})
vm.getHospitals();
vm.getResolvingStatus();